Passive ranging and a three-dimensional imaging system through wavefront coding
Zhang Xing-Xu1, Qiao Lei1, Zhao Ting-Yu1, , Qiu Rong-Sheng2
College of Physics, Zhejiang Sci-Tech University, Hangzhou 310016, China
Shanghai Aerospace Control Technology Institute, Shanghai 201109, China

 

† Corresponding author. E-mail: zhaotingyu@zstu.edu.cn

Abstract

A single-image passive ranging and three-dimensional (3D) imaging system with chiral phase encoding was proposed in 2011 [Opt. Lett. 36, 115 (2011)]. A new theoretical analysis of the system in space domain is presented in this paper. We deduce the analytic relationships between the object distance and the point spread function, and between the object distance and the encoded image, respectively. Both the point spread function and the processed spectrum of the encoded image have two spots, which will rotate with the variation of the object distance. Then the depth map is extracted from the encoded image and it can be used to set up 3D images. The theoretical analysis is verified by a wavefront coding system with a chiral phase which is generated by a phase-only liquid-crystal spatial light modulator. The phase generated by the liquid-crystal spatial light modulator is more flexible than the fixed phase mask and can be adjusted in real time. It is especially suitable for observing the object with a large depth of field.

1. Introduction

In the past decade, the increasing interest has been aroused in the use of hybrid optical and digital techniques to provide improved imaging capabilities or extra degrees of freedom in designing the imaging systems. This technique which is known as wavefront coding brought great changes to optical system design.[13] The wavefront coding system consists of two parts: optical encoding and digital decoding. The system is optically encoded by using a specially designed phase mask on the pupil plane, thus it has particular characteristics such as sensitivity to the object distance.[4] The images captured in the image plane are called encoded images. Desired information such as object distance or sharp graphics information is usually extracted from the encoded images through digital decoding.

Simonov et al. presented a single-image passive ranging and three-dimensional (3D) imaging system in incoherent light based on a wavefront coding technology by using a chiral phase mask in 2011.[4] They analyzed the system in the frequency domain, while in the present paper we present the theoretical analysis in the spatial domain. We deduct the analytic relationships between the object distance and the point spread function, and between the object distance and the encoded image. Then the depth information can be extracted from the encoded images. In addition, the chiral phase mask used in previous research is processed by machine tools. Since the optimal parameter of the phase mask may vary with service time and circumstances, it is beneficial to employ a programmable phase element that can be optimized in real time.[5] Therefore, the phase mask is generated by a spatial light modulator (SLM), which is an object that imposes some form of spatially varying modulation on a light beam and it is programmable in real time. By doing this, we set up a programmable real-time passive ranging system. It is more flexible and can be adjusted in real time.

In Section 2 the theoretical analysis of the passive ranging system through chiral phase encoding is carried out. The object distance is very sensitive to the point spread function (PSF) of the wavefront coding system. The analytic relationships are demonstrated between the object distance and the PSF, and between the object distance and the encoded images. Experimental analysis is given in Section 3. First, the SLM is calibrated to obtain the optimal phase modulation for optical encoding in the wavefront coding system. Then a doublet is used as an example to set up the system and an SLM is used as the phase mask. Finally, the depth map is extracted from the encoded image successfully. Section 4 is devoted to the discussion and conclusion.

2. Theoretical analysis

The imaging quality of an optical system is determined by the pupil function.[6,7] By adding a chiral phase mask on the pupil plane, the optical system becomes particularly sensitive to the object distance. The object distance reflects the depth information in the object space. The digital decoding is used to extract the depth map from the encoded image. The depth information can be used to restore the 3D image of the object. This paper will analyze the system in the space domain.

2.1. Optical encoding

Sharp images will be achieved if the system satisfies the Gauss imaging formula. Assume that f is the focal length of the optical system, zi is the image distance, and zo is the object distance. Similarly, the image distance will change to obtain sharp images when the object distance varies . Both of them satisfy the Gaussian lens formula[8,9]

Therefore, the variation of the object distance leads to the blurred image if zi is kept unchanged. The aberration is called defocus aberration φ and it is defined as[10]
where D is the side length of a square pupil, and λ is the incident light wavelength. For simplicity, all the aberrations are ignored except defocus aberration in this paper.[2,11]

It is assumed that a phase mask Z is placed on the pupil plane of the optical system. Then the exit pupil of an optical system can be described in canonical pupil coordinates as[12]

where and
is the expression of the phase mask added to the pupil. Taking a chiral phase mask for example, it consists of two tilted planes with the opposite tilt constants, as shown in Fig. 1. Then we have
B is the prism constant, and a and b denote the width and length of a single inclined plane, respectively, as shown in Fig. 1.

Fig. 1. Profile of a chiral phase mask.

The PSF of a wavefront coding optical system using a chiral phase mask is called the encoded PSF. In the case of small φ, it can be approximated as

where represent the coordinates on the image plane,
M and N are deduced in Appendix A, n is the refractive index of the phase mask, and C0 is a function of defocused spot.[10]

According to Eq. (6), the encoded PSF consists of two defocused spots, which correspond to the two parts of the chiral phase mask shown in Fig. 1, respectively. The centers of the spots are located at and , respectively. The slope k of the line between the centers of the spots is calculated by (please refer to Appendix A)

In this way, the object distance can be calculated by measuring the slope of the line between the centers of the defocused spots in the PSF by using Eqs. (1) and (7).

However, the image captured in the image plane is regarded as the convolution of the object and PSF. Consequently, in the case of a spatially-extended object, to determine the unknown object distance, the encoded image should be additionally analyzed. We will discuss a method to extract the object distance from the encoded images in the following subsection.

2.2. Digital decoding

Suppose that I denotes the object. Image , which is captured in the image plane, can be indicated as the convolution of the object and the PSF of the optical system. Using Eq. (6), the image is described as

where indicates the convolution. Equation (8) indicates that the encoded image is the superimposition of two parts which are described as with two center-displacements and , respectively.

Note that the displacement in space domain corresponds to the phase shift in the frequency domain. Thus the spectrum of the object U0 in the frequency domain is the Fourier transform of the object

Let , and its frequency domain will be represented as
Note that is the image of with the displacement in the and directions, respectively. According to the displacement theorem of the two-dimensional (2D) Fourier transform, its spectrum can be written as
where denotes the coordinates in the frequency domain. Similarly, we obtain
According to Eqs. (8), (11), and (12), the spectrum of the image is shown as follows:
Take the modulus of Eq. (13),
The inverse Fourier transform is applied to Eq. (14), which is represented by . Considering that it is a complex function, thus taking the real part of , we obtain
Generally, the low-frequency information is a dominant component of the object in the frequency domain. Therefore, there is a peak of located at the zero frequency. Note that and are Dirac delta functions centered at and , respectively. According to the sampling property of the Dirac delta function, can be regarded as shifting along the axis and along the axis. Consequently, the peak of is located at . Similarly, the peak of is located at . In this way, has two peaks located at and respectively, which are origin-symmetric. We call them the twin peaks. The slope of the line between the twin peaks of is k, which is the same as the slope of the line between the defocused spots of the PSF as shown in Eq. (7). Thus, the object distance can be calculated through Eq. (7).

Using this method, we can extract the depth information from the encoded images in the wavefront coding optical system with a chiral phase mask.

3. Experimental analysis
3.1. Calibration of SLM

An SLM is used to generate the chiral phase instead of a machine-tooled phase mask for its flexibility. The SLM used here is a twisted-nematic liquid-crystal modulator (HEO0017) from Holoeye. The device enables electrically modulated birefringence in transmission mode and is controlled by means of a video signal with a resolution 1024×768 pixels and 8 bits in depth.

Generally, the SLM needs to be calibrated before use. An interference device is set up to calibrate the SLM. The SLM is placed between a polarizer and an analyzer. As shown in Fig. 2, light emitted from He–Ne laser is expanded by a microscope objective and lens 1. The light is divided into two beams by a beam splitter. One beam is reflected by the beam splitter and reflector 1, while the other beam goes through the beam splitter and is reflected by reflector 2. Both of the beams pass through lens 2 and focus on the image plane causing interference. The interference fringes are recorded by a charge coupled device (CCD) image sensor. As shown in Fig. 3(a), the fringes are straight if the modulations at all parts of the SLM in the application are at the same gray level, such as zero. However, there will be misplacement in fringe if the modulation at half of the SLM in the application of the gray level is 0, while the other half is 255 as shown in Fig. 3(b).

Fig. 2. (color online) Experimental setup for phase modulation.
Fig. 3. (color online) Interference fringe patterns obtained by CCD while changing the gray level of SLM: (a) for all parts, gray level is 0; (b) for one half part, gray level is 0 and for the other half part, gray level is 255.

To achieve a maximum phase modulation, the optimal combination of angles of the polarizer and the analyzer need to be found out. The angles of the polarizer and analyzer are adjusted by keeping the modulation at half of the SLM in the application of the gray level at 0, while at another half of the SLM the gray level is at 255. The best combination of angles of the polarizer and the analyzer is obtained when the misplacement of interference fringes reaches the maximum.

To obtain the relationship between the gray level and the phase modulation at the optimal combination of angles of the polarizer and the analyzer, the gray level of one half part of the SLM is kept at 0, and another half is linearly varied. The dynamic range for the variation of gray level is [0, 255]. The phase modulation caused by the variation of SLM gray level results in the misplacement of interference fringes. By measuring the misplacement of the interference fringe in the CCD, we obtain the phase modulation

where ϕ is the phase modulation, is the misplacement of the interference fringe, and ϑ is the period width of the interference fringe. Thus, the relationship between the phase modulation ϕ and the gray level is illustrated by the dash-dotted line in Fig. 4.

Fig. 4. (color online) Plots of phase modulation versus gray level.

However, the ideal modulation curve is linear and ranges from 0 to 255 as shown by the solid line in Fig. 4. Neither the phase modulation nor the gray level of the SLM shows a linear relation. Thus there will be a phase modulation error. In order to overcome this deficiency, the SLM is calibrated by a look-up table with linear interpolation as shown by the dashed line in Fig. 4 to obtain the appropriate optimal phase modulation.

3.2. An example of wavefront coding systems through chiral phase encoding

To verify the rotation effect of the PSF, a PSF test system is set up as shown in Fig. 5. An achromatic lens is used as the imaging system. The focal length f of the lens is 200 mm. The image distance of the optical system zi is 250 mm. The object, a point light source, is generated by the He–Ne laser and a microscope objective on the translation stage. The point light source is 1000 mm away from the lens, i.e., the object distance zo is 1000 mm. The parameters of the chiral phase mask used in the experiment are described as those in Eq. (5), where , a = D/2, and b = D.

Fig. 5. (color online) PSF test system.

The object distance is varied by moving the microscope objective. Figure 6 shows the PSFs of different variations of the object distance . There are two spots in the PSF, and they rotate with the variation of the object distance. It is consistent with Eq. (6). The dots in Fig. 7 describe the slopes of the line between spots in PSF with different object distance variations. A linear fitting method is used to obtain the approximate relationship between the object distance variation and the slope as indicated by the solid line in Fig. 7. In this way, the connection between the object distance and the PSF is established, and it is saved in a lookup table. Since the slope of the line between the two spots of the PSF is the same as that between the twin peaks of , the depth information will be achieved from the encoded image through the look-up table.

Fig. 6. (color online) PSFs of optical system with object distance variation (a) , (b) 2 mm, (c) 3 mm, (d) 4 mm, (e) 5 mm, and (f) 6 mm, where the central points are denoted with cross marks and connected by a solid line.
Fig. 7. (color online) Slope of the line between centers of defocused spots in PSF versus object distance variation.
Fig. 8. (color online) Optical system of wavefront coding system.

Two wooden blocks with step height are used as an object as shown in Fig. 9(a). Due to the small field of view of the wavefront coding optical system, the encoded image captured in CCD is a part of the object as indicated in Fig. 9(b). Figure 9(a) demonstrates the same part of the object for showing the consistency. Here X is 6.00 mm.

Fig. 9. (color online) Object and the encoded image of the wavefront coding system: (a) object with a step, and (b) encoded image captured in CCD, which is divided into sub-images for digital restoration. One sub-image is shown with the red square as an example.

The encoded image is divided into a number of sub-images which will be analyzed to obtain the object distance of each sub-image. All sub-images are then processed separately to determine their local ranges.[4] The encoded image shown in Fig. 9(b) is acquired by a CCD sensor and processed as a 1920×1920 8-bit frame, and divided into 8×8 sub-images. A sub-image identified in the red frame of Fig. 9(b) is taken for example. Figure 10(a) shows the result of Eq. (11) on the sub-image in the red square frame shown in Fig. 9(b). Two twin peaks are shown in Fig. 10(a) in the black and the red square frame respectively. The enlarged image of the twin peak, marked in a black square, is shown in Fig. 10(b). The positions of the twin peaks can be calculated. Thus we can calculate the slope of the line between the secondary peaks. The object distance information of the sub-image is achieved through the look-up table containing the relationship between the object distance and the slope. Similarly, taking the same operation on the rest of the sub-images, we can obtain the depth map of the object as shown in Fig. 11.

Fig. 10. (color online) (a) Calculation result of Eq. (15) of the sub-image marked with a red square in Fig. 9(b), and (b) enlarged sub-image marked with a black square in Fig. 10(a).
Fig. 11. (color online) Depth map of the object.

According to Fig. 11, the values of object distance variation of two surfaces of the blocks are about 5.89 mm and 12.19 mm, respectively. The step height between the two blocks is 6.30 mm, which is close to 6.00 mm. Although there are some certain errors, the depth map of the object is digitally decoded successfully. The errors can be reduced by dividing the encoded image into more sub-images, so that the resolution of the restored depth map will increase.

4. Conclusions and perspectives

The system through chiral phase encoding is sensitive to the object distance. In this paper, we deduce the analytic relationships between the object distance and the point spread function, and between the object distance and the encoded image. The theoretical analysis shows that the point spread function has two spots, which will rotate with the variation of the object distance. In addition, the processed spectrum of the encoded image has twin peaks rotating with the variation of the object distance. Then the depth information is extracted from the twin peaks of the encoded image. The theoretical analysis is verified by a wavefront coding system with a chiral phase which is generated by a phase-only liquid-crystal spatial light modulator. Compared with the fixed phase mask, the phase generated by the liquid-crystal spatial light modulator is very flexible and can be adjusted in real time.

The resolution of the 3D image obtained in the experiment can be further increased. The images can be divided into more sub-images to achieve a smooth image. Furthermore, the denoising algorithms will be considered to extract the twin peaks of the encoded image in an easier way in future research. Generally, weakly textured objects are accurate when the spatial spectrum of the object is wide enough to cover at least a few characteristic fringes. The use of high definition phase encoded images can also improve the reconstruction accuracy of the depth map of the object.

In this paper, a passive ranging system is also analyzed from another point of view, and the intuitive relationship between the depth information and the encoded image is presented. It is believed that the present study is helpful in developing the passive 3D imaging technology.

Reference
[1] Se S Nick P 2012 3D Imaging, Analysis and Applications London Springer
[2] Dowski E R Cathey W T 1994 Appl. Opt. 33 6762
[3] Johnson G E Edward R D Cathey W T 2000 Appl. Opt. 39 1700
[4] Simonov A N Michiel C R 2011 Opt. Lett. 36 115
[5] Carles G Muyo G Bosch S Harvey A R 2010 J. Mod. Opt. 57 893
[6] Pavani S R P Rafael P 2008 Opt. Express 16 3484
[7] Greengard A Yoav Y S Rafael P 2006 Opt. Lett. 31 181
[8] Born M Emil W 1999 Principles of Optics 7 Cambridge Cambridge University Press
[9] Goodman J W 2005 Introduction to Fourier Optics Grand Rapids Roberts and Company Publishers
[10] Simonov A N 2014 JOSA 31 2680
[11] Zhao T Liu Q Yu F 2012 Chin. Phys. 21 064203
[12] Zhao T Chen Y Zhang W Ye Z Yu F 2007 Chin. Opt. Lett. 5 71